﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace ElingOA6_Admin_DSJCJ.BLL
{
    /// <summary>
    /// 业务逻辑类Daily 的摘要说明。
    /// </summary>
    public partial class Daily
    {
        /// <summary>
        /// DAL定义的便利
        /// </summary>
        private readonly ElingOA6_Admin_DSJCJ.DAL.Daily dal=new ElingOA6_Admin_DSJCJ.DAL.Daily();

        /// <summary>
        /// 得到第几周
        /// </summary>
        /// <param name="i">参数</param>
        /// <returns>数据表</returns>
        public DataSet GetDay(int i) 
        {
            return dal.GetDay(i);
        }

        /// <summary>
        /// 得到这天是不是假日
        /// </summary>        
        /// <param name="date">时间</param>
        /// <returns>数据表</returns>
        public DataSet GetHol(DateTime date)
        {
            return dal.GetHol(date);
        }
        /// <summary>
        /// 休息不计算
        /// </summary>
        /// <param name="date"></param>
        /// <returns></returns>
        public string Pd(DateTime date)
        {
            return dal.Pd(date);          
        }
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="entityNo">公司编号</param>
        /// <param name="emplNo">员工编号</param>
        /// <param name="date">时间</param>
        /// <returns>是否存在该记录</returns>
        public bool Exists(string entityNo, string emplNo, DateTime date)
        {
            return dal.Exists(entityNo, emplNo, date);
        }

        /// <summary>
        /// 得到这周的所有天数
        /// </summary>
        /// <param name="i">参数</param>
        /// <param name="gowk">参数</param>
        /// <returns>数据表</returns>
        public DataSet GetAllDay(int i, int gowk)
        {
            return dal.GetAllDay(i, gowk);
        }



        /// <summary>
        /// 增加一条数据
        /// </summary>
        /// <param name="model">model对象</param>
        /// <returns>数据添加</returns>
        public decimal Add(ElingOA6_Admin_DSJCJ.Model.Daily model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        /// <param name="model">model对象</param>
        /// <returns>是否更新</returns>
        public bool Update(ElingOA6_Admin_DSJCJ.Model.Daily model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="fDate">时间</param>
        /// <param name="fEmplNo">员工编号</param>
        /// <param name="fEntityNo">公司编号</param>
        /// <returns>是否存在</returns>
        public bool Exists(DateTime fDate, string fEmplNo, string fEntityNo)
        {
            return dal.Exists(fDate, fEmplNo, fEntityNo);
        }



        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        /// <param name="fDate">时间</param>
        /// <param name="fEmplNo">员工编号</param>
        /// <param name="fEntityNo">公司编号</param>
        /// <returns>得到一个对象</returns>
        public ElingOA6_Admin_DSJCJ.Model.Daily GetModel(DateTime fDate, string fEmplNo, string fEntityNo)
        {

            return dal.GetModel(fDate, fEmplNo, fEntityNo);
        }

        /// <summary>
        /// 得到日志内容
        /// </summary>
        /// <param name="beginDate">日期</param>
        /// <param name="empNo">员工编号</param>
        /// <returns>数据表</returns>
        public DataSet GetDailyText(string beginDate, string empNo)
        {
            return dal.GetDailyText(beginDate, empNo);
        }

        /// <summary>
        /// 得到当天人员的去留情况
        /// </summary>
        /// <param name="beginDate">日期</param>
        /// <param name="empNo">员工编号</param>
        /// <returns>数据表</returns>
        public DataSet GetLeave(string beginDate, string empNo)
        {
            return dal.GetLeave(beginDate, empNo);
        
        }

        /// <summary>
        /// 得到人员离开的原因
        /// </summary>
        /// <param name="beginDate">日期</param>
        /// <param name="empNo">人员编号</param>
        /// <returns>数据列表</returns>
        public DataSet GetLeaveReason(string beginDate, string empNo)
        {
            return dal.GetLeaveReason(beginDate, empNo);

        }

    }

}
